#!/usr/bin/python
#Filename : seq.py

shoplist = ['apple', 'banana','cake','mango']
print 'Item 0 is', shoplist[0]
print 'Item 1 is', shoplist[1]
print 'Item 2 is', shoplist[2]
print 'Item 3 is', shoplist[3]
print 'Item -1 is', shoplist[-1]
print 'Item -3 is', shoplist[-3]
print 'Item -4 is', shoplist[-4]


print 'Item 1 to 3 is', shoplist[1:3]
print 'Item 0 to 3 is', shoplist[0:3]
print 'Item 1 to end  is', shoplist[1:]
print 'Item  is', shoplist[:]
print 'Item -1 to end 1 is', shoplist[-1:1]
print 'Item 1 to end -1 is', shoplist[1:-1]
print 'Item -3 to end -1 is', shoplist[-3:-1]

name = "issta"
print 'chars 1 to 3', name[1:3]
print 'chars 1 to end', name[1:]
print 'chars 1 to -1', name[1:-1]
print 'chars -1 to 1', name[-1:1]
